using B.S.Medical.ErrorCode;
using MediatR;

namespace B.S.Medical.Api.Read.Application.Command.Payment
{
    /// <summary>
    /// 提交退款命令
    /// </summary>
    public class SubmitRefundCommand : IRequest<ApiResult<RefundResultDto>>
    {
        /// <summary>
        /// 支付记录ID
        /// </summary>
        public int PaymentId { get; set; }
        
        /// <summary>
        /// 订单号
        /// </summary>
        public string OrderNo { get; set; }
        
        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal RefundAmount { get; set; }
        
        /// <summary>
        /// 退款原因（可选）
        /// </summary>
        public string RefundReason { get; set; }
    }
    
    /// <summary>
    /// 退款结果DTO
    /// </summary>
    public class RefundResultDto
    {
        /// <summary>
        /// 是否退款成功
        /// </summary>
        public bool Success { get; set; }
        
        /// <summary>
        /// 退款金额
        /// </summary>
        public decimal RefundAmount { get; set; }
        
        /// <summary>
        /// 退款后卡内余额
        /// </summary>
        public decimal CardBalance { get; set; }
        
        /// <summary>
        /// 退款流水号
        /// </summary>
        public string RefundTradeNo { get; set; }
        
        /// <summary>
        /// 退款时间
        /// </summary>
        public System.DateTime RefundTime { get; set; }
    }
} 